<?php
	loadClass('download');
	$obj=new DownLoad();
	$data = $obj->getTable(" WHERE Type ='$menuid' ORDER BY DownLoadID DESC");
	
	$paging=true;
	$display=2;
	
	/*******Start Paging*****************************/
	$page = $_GET['page'];				
	$limit = $display; 
	$total = count($data); 
	// work out the pager values 
	$pager  = Pager::getPagerData($total, $limit, $page); 
	$offset = $pager->offset; 
	$limit  = $pager->limit; 
	$page   = $pager->page;
	/*******Break paging*******************************/
?>
                <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td background="img/tieude/td_bg.jpg" height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="3%"><img src="img/tieude/td_9.jpg" width="112" height="20"></td>
                          <td width="97%">&nbsp;</td>
                        </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td height="25" bgcolor="#191919">&nbsp;</td>
                    </tr>
                    <tr>
                      <td height="11"></td>
                    </tr>
                    <tr>
                      <td height="100%" valign="top" background="img/content_bg.jpg" style="background-position:top; background-repeat:repeat-x; padding-top:15px; padding-bottom:15px; padding-left:15px; padding-right:15px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php
	for($i=$offset;$i<$offset+$limit && $data[$i]!="";)
	{
?>
                       <tr>
                          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="15%" valign="top"><img src="file/download/thumbs/<?php echo $data[$i]['Image']?>" width="90"></td>
                              <td width="85%" valign="top"><span class="main_news_tieude"><?php echo $data[$i]['DownLoadName']?></span><br>
                                <?php echo $data[$i]['Summary']?><br>
                                <a href="file/download/<?php echo $data[$i]['DownLoadFile']?>" class="main_link" target="_blank">Tải về</a></td>
                            </tr>
                          </table></td>
                        </tr>
<?php
		$i++;
	}
?>
 
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        
                        <tr>
                          <td align="center" bgcolor="#252525">
                          <?php
                          include("module/common/pagination.php");
						  ?>
                          </td>
                        </tr>
                      </table>                        
                      <p>&nbsp;</p></td>
                    </tr>
                  </table>